package com.xhg.util.mail;



public class TestMail {
	public static void main(String[] args) {
		MailSenderInfo mailInfo = new MailSenderInfo();
		mailInfo.setMailServerHost("smtp.qq.com");//邮件服务器ip或域名
		mailInfo.setMailServerPort("25"); //端口号
		mailInfo.setUserName("59834156@qq.com");//发送者用户名
		mailInfo.setPassword("");//发送者密码
		mailInfo.setToAddress(new String[]{"335089403@qq.com"});//邮件接收者的地址
		mailInfo.setCcAddress(new String[]{});//抄送人地址
		mailInfo.setBccAddress(new String[]{});//密送人地址
		mailInfo.setSubject("设置邮箱标题"); //邮件主题
		mailInfo.setContent("设置邮箱内容");//邮件类容
	    mailInfo.setAttachFileNames(new String[]{"D:\\a.txt","D:\\user.jpg"});
	    mailInfo.sendMail();
	}
}
